package com.app.megaprosoft.DB;

import java.sql.*;

import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.util.Log;

public class Item {
	 ResultSet rs = null;
	
	 SQLiteDBClass myDb;
	 SQLiteDatabase db;
	 Context context;
	private static final String TABLE_Item = "_Item";	
	public Context getContext() {
		return context;
	 }

	 public void setContext(Context context) {
		this.context = context;
	 }
	 
	private String ItemCode,ItemName,ItemEngName,ItemDesc,ItemPicPath,ItemUnitCode,AltItemUnitCode,ItemGroupCode,BPItemCode1,BPItemCode2;
	private short IsMainRawPart,ItemWeightingStatus,StockOut,IsReplaceItem ;
	private	double ItemRawAverageWeight,AvgWeightAltUnit,MinStock,ItemPrice;
	private String 	BrandCode,ItemSizeCode,ModelCode,ArCode,ReplaceItemPacketCode,BarCodeUPC,BarCode2D,
					IsPromotion,
					PromotionStartDate,
					PromotionEndDate;
	
	private int Duration = 0;
	
	private String OID,
		    UsrOpt,
		    IsActive,
		    IsDeleted;
	
	String StrParamItemGroupMainCode;
	String StrParamItemGroupCode;
	String StrParamBrandCode;
	String StrParamModelCode;
	String StrParamItemName="";
	String StrParamBPItemCode1="";
	String StrParamApName="";
	String StrParamBarCode="";
	
	String  IsStock,
			IsGeneric,
			IsBOM,
			IsPurchase,
			IsSold,
			IsDiscontinued;
		    
    public Item() 
	{
		ItemCode=ItemName=ItemEngName=ItemDesc=ItemPicPath=ItemUnitCode=AltItemUnitCode=ItemGroupCode=ArCode=BPItemCode1=BPItemCode2="";
		IsMainRawPart = 0;
		IsReplaceItem = 0;
		ItemWeightingStatus = 0;
		StockOut = 0 ;
		MinStock = 0.0F;
		ItemPrice = 0.0F;
		ItemRawAverageWeight = AvgWeightAltUnit = 0.0F;
		ReplaceItemPacketCode = "";
		IsStock=IsGeneric=IsBOM=IsPurchase=IsSold=IsDiscontinued="";
    }
    
    public Item(
    		String OID,
    		String UsrOpt,
    		String IsActive,
    		String IsDeleted,
    		String ItemCode,
    		String ItemName,
    		String ItemEngName,
    		String ItemDesc,
    		String ItemPicPath,
    		String ItemUnitCode,
    		String AltItemUnitCode,
    		String ItemGroupCode,
    		String BPItemCode1,
    		String BPItemCode2,    		
    		short IsMainRawPart,
    		short ItemWeightingStatus,
    		short StockOut,
    		short IsReplaceItem,
    		double ItemRawAverageWeight,
    		double AvgWeightAltUnit,
    		double MinStock,
    		double ItemPrice,
    		String BrandCode,    		
    		String ItemSizeCode,
    		String ModelCode,
    		String ArCode,
    		String ReplaceItemPacketCode,
    		String IsStock,
    		String IsGeneric,
    		String IsBOM,
    		String IsPurchase,
    		String IsSold,
    		String IsDiscontinued,
    		String BarCodeUPC,
    		String BarCode2D,
    		int Duration,
    		String IsPromotion,
    		String PromotionStartDate,
    		String PromotionEndDate
    		)
    {
	    	this.OID = OID;
	    	this.UsrOpt = UsrOpt;
	    	this.IsActive = IsActive;
	    	this.IsDeleted = IsDeleted;
	    	this.ItemCode = ItemCode;
	    	this.ItemName = ItemName;
	    	this.ItemEngName = ItemEngName;
	    	this.ItemDesc = ItemDesc;
	    	this.ItemPicPath = ItemPicPath;
	    	this.ItemUnitCode = ItemUnitCode;
	    	this.AltItemUnitCode = AltItemUnitCode;
	    	this.ItemGroupCode = ItemGroupCode;
	    	this.BPItemCode1 = BPItemCode1;
	    	this.BPItemCode2 = BPItemCode2;    	
	    	this.IsMainRawPart = IsMainRawPart; 
			this.ItemWeightingStatus = ItemWeightingStatus;
			this.StockOut = StockOut;
			this.IsReplaceItem = IsReplaceItem;
			this.ItemRawAverageWeight = ItemRawAverageWeight;
			this.AvgWeightAltUnit = AvgWeightAltUnit;
			this.MinStock = MinStock;
			this.ItemPrice = ItemPrice;
			this.BrandCode = BrandCode;
	    	this.ItemSizeCode = ItemSizeCode;
	    	this.ModelCode = ModelCode;
	    	this.ArCode = ArCode;
	    	this.ReplaceItemPacketCode = ReplaceItemPacketCode;
	    	this.IsStock = IsStock;
	    	this.IsGeneric = IsGeneric;
	    	this.IsBOM = IsBOM;
	    	this.IsPurchase = IsPurchase;
	    	this.IsSold = IsSold;
	    	this.IsDiscontinued  = IsDiscontinued;
	    	this.BarCodeUPC  = BarCodeUPC;
	    	this.BarCode2D  = BarCode2D;
	    	this.Duration = Duration;
	    	this.IsPromotion = IsPromotion;
	    	this.PromotionStartDate = PromotionStartDate;
	    	this.PromotionEndDate = PromotionEndDate;
    }
    
    
    //--------------Parameter----------//
    
	public String getStrParamItemGroupMainCode() {
		return StrParamItemGroupMainCode;
	}

	public int getDuration() {
		return Duration;
	}

	public void setDuration(int duration) {
		Duration = duration;
	}

	public String getStrParamBarCode() {
		return StrParamBarCode;
	}

	public void setStrParamBarCode(String strParamBarCode) {
		StrParamBarCode = strParamBarCode;
	}

	public void setStrParamItemGroupMainCode(String strParamItemGroupMainCode) {
		StrParamItemGroupMainCode = strParamItemGroupMainCode;
	}

	public String getStrParamItemGroupCode() {
		return StrParamItemGroupCode;
	}

	public void setStrParamItemGroupCode(String strParamItemGroupCode) {
		StrParamItemGroupCode = strParamItemGroupCode;
	}

	public String getStrParamBrandCode() {
		return StrParamBrandCode;
	}

	public void setStrParamBrandCode(String strParamBrandCode) {
		StrParamBrandCode = strParamBrandCode;
	}

	public String getStrParamModelCode() {
		return StrParamModelCode;
	}

	public void setStrParamModelCode(String strParamModelCode) {
		StrParamModelCode = strParamModelCode;
	}

	public String getStrParamItemName() {
		return StrParamItemName;
	}

	public void setStrParamItemName(String strParamItemName) {
		StrParamItemName = strParamItemName;
	}

	public String getStrParamBPItemCode1() {
		return StrParamBPItemCode1;
	}

	public void setStrParamBPItemCode1(String strParamBPItemCode1) {
		StrParamBPItemCode1 = strParamBPItemCode1;
	}

	public String getStrParamApName() {
		return StrParamApName;
	}

	public void setStrParamApName(String strParamApName) {
		StrParamApName = strParamApName;
	}

	public String getIsPromotion() {
		return IsPromotion;
	}

	public void setIsPromotion(String isPromotion) {
		IsPromotion = isPromotion;
	}

	public String getPromotionStartDate() {
		return PromotionStartDate;
	}

	public void setPromotionStartDate(String promotionStartDate) {
		PromotionStartDate = promotionStartDate;
	}

	public String getPromotionEndDate() {
		return PromotionEndDate;
	}

	public void setPromotionEndDate(String promotionEndDate) {
		PromotionEndDate = promotionEndDate;
	}

	public String getOID() {
		return OID;
	}

	public void setOID(String oID) {
		OID = oID;
	}

	public String getUsrOpt() {
		return UsrOpt;
	}

	public void setUsrOpt(String usrOpt) {
		UsrOpt = usrOpt;
	}

	public String getIsActive() {
		return IsActive;
	}

	public void setIsActive(String isActive) {
		IsActive = isActive;
	}

	public String getIsDeleted() {
		return IsDeleted;
	}

	public void setIsDeleted(String isDeleted) {
		IsDeleted = isDeleted;
	}

	public void setBPItemCode1(String BPItemCode1) {
		this.BPItemCode1 = BPItemCode1;
	}

	public void setBPItemCode2(String BPItemCode2) {
		this.BPItemCode2 = BPItemCode2;
	}

	public void setItemCode(String ItemCode) {
		this.ItemCode = ItemCode;
	}

	public void setItemName(String ItemName) {
		this.ItemName = ItemName;
	}

	public void setItemEngName(String ItemEngName) {
		this.ItemEngName = ItemEngName;
	}

	public void setItemDesc(String ItemDesc) {
		this.ItemDesc = ItemDesc;
	}

	public void setItemPicPath(String ItemPicPath) {
		this.ItemPicPath = ItemPicPath;
	}

	public void setItemUnitCode(String ItemUnitCode) {
		this.ItemUnitCode = ItemUnitCode;
	}

	public void setAltItemUnitCode(String AltItemUnitCode) {
		this.AltItemUnitCode = AltItemUnitCode;
	}

	public void setItemGroupCode(String ItemGroupCode) {
		this.ItemGroupCode = ItemGroupCode;
	}

	public void setIsMainRawPart(String IsMainRawPart) {
		this.IsMainRawPart = Short.valueOf(IsMainRawPart).shortValue();
	}

	public void setItemWeightingStatus(String ItemWeightingStatus) {
		this.ItemWeightingStatus = Short.valueOf(ItemWeightingStatus).shortValue();
	}

	public void setItemRawAverageWeight(String ItemRawAverageWeight) {
		this.ItemRawAverageWeight = Double.valueOf(ItemRawAverageWeight).doubleValue();
	}

	public void setAvgWeightAltUnit(String AvgWeightAltUnit) {
		this.AvgWeightAltUnit = Double.valueOf(AvgWeightAltUnit).doubleValue();
	}

	public void setBrandCode(String BrandCode) {
		this.BrandCode = BrandCode;
	}

	public void setItemSizeCode(String ItemSizeCode) {
		this.ItemSizeCode = ItemSizeCode;
	}

	public void setModelCode(String ModelCode) {
		this.ModelCode = ModelCode;
	}

	public void setMinStock(String MinStock) {
		this.MinStock = Double.valueOf(MinStock).doubleValue();
	}

	public void setStockOut(String StockOut) {
		this.StockOut = Short.valueOf(StockOut).shortValue();
	}

	public void setArCode(String ArCode) {
		this.ArCode = ArCode;
	}

	public void setIsReplaceItem(String IsReplaceItem) {
		this.IsReplaceItem = Short.valueOf(IsReplaceItem).shortValue();
	}

	public void setReplaceItemPacketCode(String ReplaceItemPacketCode) {
		this.ReplaceItemPacketCode = ReplaceItemPacketCode;
	}

	public void setItemPrice(String ItemPrice) {
		this.ItemPrice = Double.valueOf(ItemPrice).doubleValue();
	}

	// ///////////////////////////////////////////////////////////////////////////////

	public String getBPItemCode1() {
		return this.BPItemCode1;
	}

	public String getBPItemCode2() {
		return this.BPItemCode2;
	}

	public String getItemCode() {
		return this.ItemCode;
	}

	public String getItemName() {
		return this.ItemName;
	}

	public String getItemEngName() {
		return this.ItemEngName;
	}

	public String getItemDesc() {
		return this.ItemDesc;
	}

	public String getItemPicPath() {
		return this.ItemPicPath;
	}

	public String getItemUnitCode() {
		return this.ItemUnitCode;
	}

	public String getAltItemUnitCode() {
		return this.AltItemUnitCode;
	}

	public String getItemGroupCode() {
		return this.ItemGroupCode;
	}

	public short getIsMainRawPart() {
		return this.IsMainRawPart;
	}

	public short getItemWeightingStatus() {
		return this.ItemWeightingStatus;
	}

	public double getItemRawAverageWeight() {
		return this.ItemRawAverageWeight;
	}

	public double getAvgWeightAltUnit() {
		return this.AvgWeightAltUnit;
	}

	public String getBrandCode() {
		return this.BrandCode;
	}

	public String getItemSizeCode() {
		return this.ItemSizeCode;
	}

	public String getModelCode() {
		return this.ModelCode;
	}

	public double getMinStock() {
		return this.MinStock;
	}

	public short getStockOut() {
		return this.StockOut;
	}

	public String getArCode() {
		return this.ArCode;
	}

	public short getIsReplaceItem() {
		return this.IsReplaceItem;
	}

	public String getReplaceItemPacketCode() {
		return this.ReplaceItemPacketCode;
	}

	public double getItemPrice() {
		return this.ItemPrice;
	}
	
	public String getIsStock() {
		return IsStock;
	}

	public void setIsStock(String isStock) {
		IsStock = isStock;
	}

	public String getIsGeneric() {
		return IsGeneric;
	}

	public void setIsGeneric(String isGeneric) {
		IsGeneric = isGeneric;
	}

	public String getIsBOM() {
		return IsBOM;
	}

	public void setIsBOM(String isBOM) {
		IsBOM = isBOM;
	}

	public String getIsPurchase() {
		return IsPurchase;
	}

	public void setIsPurchase(String isPurchase) {
		IsPurchase = isPurchase;
	}

	public String getIsSold() {
		return IsSold;
	}

	public void setIsSold(String isSold) {
		IsSold = isSold;
	}

	public String getIsDiscontinued() {
		return IsDiscontinued;
	}

	public void setIsDiscontinued(String isDiscontinued) {
		IsDiscontinued = isDiscontinued;
	}
	
	public String getBarCodeUPC() {
		return BarCodeUPC;
	}

	public void setBarCodeUPC(String barCodeUPC) {
		BarCodeUPC = barCodeUPC;
	}

	public String getBarCode2D() {
		return BarCode2D;
	}

	public void setBarCode2D(String barCode2D) {
		BarCode2D = barCode2D;
	}

	public ResultSet selectItem() throws Exception {
		Connect con = new Connect(); 
		String StrSql = "SELECT		[OID]," +
							  	   "[LastModified],"+
								   "[ModifyDate],"+
								   "[ModifyTime],"+
								   "[ModifiedBy],"+
								   "[UserModify],"+
								   "[CreatedDate],"+
								   "[CreateDate],"+
								   "[CreateTime],"+
								   "[CreatedBy],"+
								   "[UserCreate],"+
								   "[IsActive],"+
								   "[IsDeleted],"+
								   
								   "[ItemCode],"+
								   "[ItemName],"+
								   "[ItemEngName],"+
								   "[ItemDesc],"+
								   "[ItemPicPath],"+
								   
								   "[ItemUnitCode],"+
								   "[ItemUnitDesc],"+
								   "[AltItemUnitCode],"+
								   "[AltItemUnitDesc],"+
								   "[ItemGroupOID],"+
								   
								   "[ItemGroupCode],"+
								   "[ItemGroupDesc],"+
								   "[ItemGroupMainOID],"+
								   "[ItemGroupMainCode],"+
								   "[ItemGroupMainDesc],"+ 
								   
								   "[IsMainRawPart],"+
								   "[ItemWeightingStatus],"+
								   "[StdPrice],"+
								   "[AvgWeightAltUnit],"+		
								   "[ItemRawAverageWeight],"+ 
								   
								   "[BrandOID],"+
								   "[BrandCode],"+
								   "[BrandName],"+
								   "[ItemSizeCode],"+
								   "[ItemSizeName],"+
								   
								   "[ModelOID],"+
								   "[ModelCode],"+
								   "[ModelName],"+
								   "[MinStock],"+
								   "[StockOut],"+	
								   
								   "[Cost],"+
								   "[IsReplaceItem],"+	
								   "[ReplaceItemPacketCode],"+	
								   "[ReItemName],"+								
								   "[BPItemCode1],"+	
								   
								   "[BPItemCode2],"+
								   "[BomDocCode]," +
								   "[ApName]," +
								   "[IsStock]," +
								   "[IsGeneric]," +
								   
								   "[IsBOM]," +
								   "[IsPurchase]," +
								   "[IsSold]," +
								   "[IsDiscontinued]," +
								   "[BarCodeUPC]," +
								   
								   "[BarCode2D]," +
								   "[Duration]," +
								   "[LastBuyPrice]," +
								   "[IsPromotion]," +
								   "[PromotionStartDate]," +
								   
								   "[PromotionEndDate] "+	
							  
				        "FROM	    [dbo].[udfItem]() " +
				        
				        "WHERE      [IsDeleted] = '0' ";
		
		if (getStrParamItemGroupMainCode()!=null) {
			StrSql += "AND [ItemGroupMainOID] = '" + getStrParamItemGroupMainCode() + "' ";
		}
		
		if (getStrParamItemGroupCode()!=null) {
			StrSql += "AND [ItemGroupOID] = '" + getStrParamItemGroupCode() + "' ";
		}
		
		if (getStrParamBrandCode()!=null) {
			StrSql += "AND [BrandOID] = '" + getStrParamBrandCode() + "' ";
		}
		
		if (getStrParamModelCode()!=null) {
			StrSql += "AND [ModelOID] = '" + getStrParamModelCode() + "' ";
		}
		
		if (getStrParamItemName() != null && !getStrParamItemName().equals("")) {
			StrSql += "AND ([ItemName] LIKE '%" + getStrParamItemName() + "%' OR [ItemCode] LIKE '%" + getStrParamItemName() + "%' ) ";
		}
		
		if (getStrParamBPItemCode1() != null && !getStrParamBPItemCode1().equals("")) {
			StrSql += "AND ([BPItemCode1] LIKE '%" + getStrParamBPItemCode1() + "%' OR [BPItemCode2] LIKE '%" + getStrParamBPItemCode1() + "%') ";
		}
		
		if (getStrParamApName() != null && !getStrParamApName().equals("")) {
			StrSql += "AND [ApName] LIKE '%" + getStrParamApName() + "%' ";
		}
		
		if (getStrParamBarCode() != null && !getStrParamBarCode().equals("")) {
			StrSql += "AND [BarCodeUPC] LIKE '%" + getStrParamBarCode() + "%' ";
		}

		StrSql += "ORDER BY [ItemCode] ASC ";
		
		//System.out.println(StrSql);
		
    	return con.selectData(StrSql);
	 }
//	 public void closeConnecttion() throws Exception {
//    	 if (conn != null) {
//             conn.close();
//         }
//    }
	 
	 
	 public void DEFINE_Item() {
			rs = null;
			myDb = new SQLiteDBClass(getContext());
			db = myDb.getWritableDatabase();
			try {
				rs = selectItem();
				while (rs.next()) {
					ContentValues Val = new ContentValues();
					Val.put("ItemOID", rs.getString("OID"));

					Val.put("ItemCode", rs.getString("ItemCode"));
					Val.put("ItemName", rs.getString("ItemName"));
					Val.put("ItemEngName", rs.getString("ItemEngName"));
					Val.put("ItemDesc", rs.getString("ItemDesc"));
					Val.put("ItemPicPath", rs.getString("ItemPicPath"));

					Val.put("ItemUnitCode", rs.getString("ItemUnitCode"));
					Val.put("ItemUnitDesc", rs.getString("ItemUnitDesc"));
					Val.put("AltItemUnitCode", rs.getString("AltItemUnitCode"));
					Val.put("AltItemUnitDesc", rs.getString("AltItemUnitDesc"));
					Val.put("ItemGroupOID", rs.getString("ItemGroupOID"));

					Val.put("ItemGroupCode", rs.getString("ItemGroupCode"));
					Val.put("ItemGroupDesc", rs.getString("ItemGroupDesc"));
					Val.put("ItemGroupMainOID", rs.getString("ItemGroupMainOID"));
					Val.put("ItemGroupMainCode", rs.getString("ItemGroupMainCode"));
					Val.put("ItemGroupMainDesc", rs.getString("ItemGroupMainDesc"));

					Val.put("IsMainRawPart", rs.getString("IsMainRawPart"));
					Val.put("ItemWeightingStatus",
							rs.getString("ItemWeightingStatus"));
					Val.put("StdPrice", rs.getString("StdPrice"));
					Val.put("AvgWeightAltUnit", rs.getString("AvgWeightAltUnit"));
					Val.put("ItemRawAverageWeight",
							rs.getString("ItemRawAverageWeight"));

					Val.put("BrandOID", rs.getString("BrandOID"));
					Val.put("BrandCode", rs.getString("BrandCode"));
					Val.put("BrandName", rs.getString("BrandName"));
					Val.put("ItemSizeCode", rs.getString("ItemSizeCode"));
					Val.put("ItemSizeName", rs.getString("ItemSizeName"));

					Val.put("ModelOID", rs.getString("ModelOID"));
					Val.put("ModelCode", rs.getString("ModelCode"));
					Val.put("ModelName", rs.getString("ModelName"));
					Val.put("MinStock", rs.getString("MinStock"));
					Val.put("StockOut", rs.getString("StockOut"));

					Val.put("Cost", rs.getString("Cost"));
					Val.put("IsReplaceItem", rs.getString("IsReplaceItem"));
					Val.put("ReplaceItemPacketCode",
							rs.getString("ReplaceItemPacketCode"));
					Val.put("ReItemName", rs.getString("ReItemName"));
					Val.put("BPItemCode1", rs.getString("BPItemCode1"));

					Val.put("BPItemCode2", rs.getString("BPItemCode2"));
					Val.put("BomDocCode", rs.getString("BomDocCode"));
					Val.put("ApName", rs.getString("ApName"));
					Val.put("IsStock", rs.getString("IsStock"));
					Val.put("IsGeneric", rs.getString("IsGeneric"));

					Val.put("IsBOM", rs.getString("IsBOM"));
					Val.put("IsPurchase", rs.getString("IsPurchase"));
					Val.put("IsSold", rs.getString("IsSold"));
					Val.put("IsDiscontinued", rs.getString("IsDiscontinued"));
					Val.put("BarCodeUPC", rs.getString("BarCodeUPC"));

					Val.put("BarCode2D", rs.getString("BarCode2D"));
					Val.put("Duration", rs.getString("Duration"));
					Val.put("LastBuyPrice", rs.getString("LastBuyPrice"));
					Val.put("IsPromotion", rs.getString("IsPromotion"));
					Val.put("PromotionStartDate",
							rs.getString("PromotionStartDate"));

					Val.put("PromotionEndDate", rs.getString("PromotionEndDate"));

					db.insert(TABLE_Item, null, Val);
				}
				rs.close();
			} catch (Exception e) {
				Log.d("TABLE_Item", "Create Table not Successfully.");
			}
			Log.d("TABLE_Item", "Create Table Successfully.");
			db.close();
		}
	 
	 public String[][] SelectAll_Item(String ItemGroupOID,String ItemOID) {
			try {
				String arrData[][] = null;
				
				myDb = new SQLiteDBClass(getContext());
				db = myDb.getWritableDatabase();
						
				String strSQL = "SELECT  ItemOID As _id , * FROM "
						+ TABLE_Item;
				if (!ItemGroupOID.equals("")) {
					strSQL += " WHERE [ItemGroupOID] LIKE '" + ItemGroupOID + "' ";
				}
				if (!ItemOID.equals("")) {
					strSQL += " WHERE [ItemOID] LIKE '" + ItemOID + "' ";
				}
				Cursor cursor = db.rawQuery(strSQL, null);
				if (cursor != null) {
					if (cursor.moveToFirst()) {
						arrData = new String[cursor.getCount()][cursor
								.getColumnCount()];
						int i = 0;
						do {
							arrData[i][0] = cursor.getString(1);
							arrData[i][1] = cursor.getString(2);
							arrData[i][2] = cursor.getString(3);
							arrData[i][3] = cursor.getString(4);
							arrData[i][4] = cursor.getString(5);
							arrData[i][5] = cursor.getString(6);
							arrData[i][6] = cursor.getString(7);
							arrData[i][7] = cursor.getString(8);
							arrData[i][8] = cursor.getString(9);
							arrData[i][9] = cursor.getString(10);
							arrData[i][10] = cursor.getString(11);
							arrData[i][11] = cursor.getString(12);
							arrData[i][12] = cursor.getString(13);
							arrData[i][13] = cursor.getString(14);
							arrData[i][14] = cursor.getString(15);
							arrData[i][15] = cursor.getString(16);
							arrData[i][16] = cursor.getString(17);
							arrData[i][17] = cursor.getString(18);
							arrData[i][18] = cursor.getString(19);
							arrData[i][19] = cursor.getString(20);
							arrData[i][20] = cursor.getString(21);
							arrData[i][47] = cursor.getString(48);
							arrData[i][48] = cursor.getString(49);
							i++;
						} while (cursor.moveToNext());
					}
				}
				cursor.close();

				return arrData;

			} catch (Exception e) {
				return null;
			}
		}
	 
    
}
